package com.skylin.mysell;

import com.skylin.mysell.enums.ResultEnum;
import org.jetbrains.annotations.NotNull;

/**
 * @author quanlinlin on 2018/12/20 22:49.
 * @version 1.0
 */
public class SellException extends RuntimeException {


    private Integer code;

    public SellException(@NotNull ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public SellException(@NotNull ResultEnum resultEnum, String message) {
        super(message);
        this.code = resultEnum.getCode();
    }
}
